package com.izliang.gateway.client.order;

import model.Order;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;
import service.OrderService;

@Service
public class OrderClient {

    @Reference(loadbalance = "roundrobin", cluster = "failfast", check = false,mock = "com.izliang.gateway.client.order.OrderClientCallBack")
    private OrderService orderService;

    public Order getOrder(int id) {
        return orderService.findOrderByOrderId(id);
    }

    public void orderGenerate(){orderService.orderCreate();}
}
